package com.wowangz.cms.dailyoperation.services.service;

import java.util.HashMap;
import java.util.List;

import com.wowangz.cms.dailyoperation.services.pojo.ServicesMenu;
import com.wowangz.cms.syscore.exception.ServiceException;
import com.wowangz.cms.syscore.service.BaseService;



public class ServicesMenuService extends BaseService{

	/**
	 * 新增服务菜单信息
	 * @param province
	 * @throws Exception
	 */
	public void addServicesMenu(ServicesMenu servicesMenu) throws ServiceException {
		this.getSqlSession().insert("ServicesMenu.insertServicesMenu", servicesMenu);
	}
	
	/**
	 * 根据服务ID和status来查询对应的菜单id
	 * @param hashMap
	 * @return
	 * @throws ServiceException
	 */
	public List<ServicesMenu> findservicesMenuByMap(HashMap<String,Object> hashMap) throws ServiceException {
		List<ServicesMenu> list = this.getSqlSession().selectList("ServicesMenu.findservicesMenuByMap", hashMap);
		return list;
	}
	
	/**
	 * 更新服务菜单关联表
	 * @param servicesMenu
	 */
	public void updateServicesMenu(ServicesMenu servicesMenu) throws ServiceException{
		this.getSqlSession().update("ServicesMenu.updateServicesMenu", servicesMenu);
	}
	
	
	/**
	 * 删除服务菜单关联表
	 * @param servicesMenu
	 * @throws ServiceException
	 */
	public void deleteServicesMenu(ServicesMenu servicesMenu) throws ServiceException {
		this.getSqlSession().delete("ServicesMenu.deleteServicesMenu", servicesMenu);
	}
}
